﻿namespace StringsAndTextProcessing
{
    using System;

    class ReplaceWordsInText
    {
        // 1.2.13.09. We are given a string containing a list of forbidden words and a text containing some of these words.
        // Write a program that replaces the forbidden words with asterisks. Example:
        // Microsoft announced its next generation PHP compiler today. It is based on .NET Framework 4.0 and is
        // implemented as a dynamic language in CLR.
        // Words: "PHP, CLR, Microsoft"
        // The expected result:
        // ********* announced its next generation *** compiler today. It is based on .NET Framework 4.0 and is
        // implemented as a dynamic language in ***.

        static void Main()
        {
            var input = Console.ReadLine();
            var forbidenWords = "PHP, CLR, Microsoft".Split(',');
            for (var i = 0; i < forbidenWords.Length; i++)
            {
                forbidenWords[i] = forbidenWords[i].Trim();
                input = input.Replace(forbidenWords[i], new string('*', forbidenWords[i].Length));
            }

            Console.WriteLine(input);
        }
    }
}